package com.softa.common.sysconfig.mybatis.entity;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;

import java.io.Serializable;

/**
 * Add "version" Field to tables.
 * @author hasee
 */
@Data
public abstract class AbstractOptimisticLockSupportedEntity implements Serializable{

    private static final long serialVersionUID = -7671335378375341930L;
    
    @Version
    @TableField(value="version",strategy= FieldStrategy.NOT_NULL,fill= FieldFill.INSERT_UPDATE)
	protected Long version;

}
